package com.hotai.comment.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.io.Serializable;
import java.util.Date;

@Table(name = "equipment")
@Data
public class Equipment implements Serializable {

	private static final long serialVersionUID = 6565095336262680173L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@TableId(type = IdType.AUTO)
	@Column(name = "id")
	private Integer id;

	/**
	 * 编号
	 */
	@Column(name = "name")
	private String name;

	/**
	 * 序列号
	 */
	@Column(name = "xid")
	private String xid;

	/**
	 * 型号
	 */
	@Column(name = "model")
	private String model;

	/**
	 * 容量
	 */
	@Column(name = "capacity")
	private Integer capacity;

	/**
	 * 可用容量
	 */
	@Column(name = "course")
	private Double course;

	/**
	 * 安装课件
	 */
	@Column(name = "available")
	private Integer available;

	/**
	 * 1 机构 2个人
	 */
	@Column(name = "inid")
	private Integer inid;


	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")//存到数据库
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") //从数据库
	@Column(name = "create_date")
	private Date createDate;

	/**
	 * 安装课件的时间
	 */
	@Column(name = "ware_date")
	private Date wareDate;

	@Column(name = "deid")
	private Integer deid;

	/**
	 * 设备id
	 */
	@Column(name = "sid")
	private Integer sid;

	/**
	 * 状态
	 */
	@Column(name = "status")
	private Integer status;


	/**
	 * 图片
	 */
	@Column(name = "img")
	private String  img;

	/**
	 * 版本
	 */
	@Column(name = "versions")
	private String  versions;

}
